<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

<Button name="TidyPlatesPanelButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="40" y="22"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentLeft" urgency="5" file="Interface\Buttons\UI-Panel-Button-Up">
					<Size>
						<AbsDimension x="12" y="22"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
						<Anchor point="BOTTOMLEFT"/>
					</Anchors>
					<TexCoords left="0" right="0.09375" top="0" bottom="0.6875"/>
				</Texture>
				<Texture name="$parentRight" urgency="5" file="Interface\Buttons\UI-Panel-Button-Up">
					<Size>
						<AbsDimension x="12" y="22"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT"/>
						<Anchor point="BOTTOMRIGHT"/>
					</Anchors>
					<TexCoords left="0.53125" right="0.625" top="0" bottom="0.6875"/>
				</Texture>
				<Texture name="$parentMiddle" urgency="5" file="Interface\Buttons\UI-Panel-Button-Up">
					<Size>
						<AbsDimension x="12" y="22"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
					</Anchors>
					<TexCoords left="0.09375" right="0.53125" top="0" bottom="0.6875"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				if ( not self:IsEnabled() ) then
					local name = self:GetName();
					_G[name.."Left"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
					_G[name.."Middle"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
					_G[name.."Right"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
				end
			</OnLoad>
			<OnMouseDown>
				if ( self:IsEnabled() ) then
					local name = self:GetName();
					_G[name.."Left"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Down");
					_G[name.."Middle"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Down");
					_G[name.."Right"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Down");
				end
			</OnMouseDown>
			<OnMouseUp>
				if ( self:IsEnabled() ) then
					local name = self:GetName();
					_G[name.."Left"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
					_G[name.."Middle"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
					_G[name.."Right"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
				end
			</OnMouseUp>
			<OnShow>
				if ( self:IsEnabled() ) then
					-- we need to reset our textures just in case we were hidden before a mouse up fired
					local name = self:GetName();
					_G[name.."Left"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
					_G[name.."Middle"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
					_G[name.."Right"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
				end
			</OnShow>
			<OnDisable>
				local name = self:GetName();
				_G[name.."Left"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
				_G[name.."Middle"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
				_G[name.."Right"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
			</OnDisable>
			<OnEnable>
				local name = self:GetName();
				_G[name.."Left"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
				_G[name.."Middle"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
				_G[name.."Right"]:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up");
			</OnEnable>
			<OnEnter>
				if(self.tooltipText ~= nil) then
					GameTooltip_AddNewbieTip(self, self.tooltipText, 1.0, 1.0, 1.0, self.newbieText);
				end
			</OnEnter>
			<OnLeave>
				if(self.tooltipText ~= nil) then 
					GameTooltip:Hide();
				end
			</OnLeave>
		</Scripts>
		<ButtonText name="$parentText"/>
		<NormalFont style="GameFontNormal"/>
		<HighlightFont style="GameFontHighlight"/>
		<DisabledFont style="GameFontDisable"/>
		<HighlightTexture inherits="UIPanelButtonHighlightTexture"/>
	</Button>
	
	
	<Script file="TidyPlatesCubeframe.lua"/>
	<Script file="TidyPlatesCustomStatusbar.lua"/>
	
	<!-- For Testing -->
	<!--
	<Script file="TidyPlatesCore_6_9_Trial.lua"/>
	<Script file="MetasequoiaCore.lua"/>
	-->
	<Script file="TidyPlatesCore.lua"/>
	
	<Script file="TidyPlatesUtility.lua"/>
	<Script file="TidyPlatesDefaults.lua"/>
	<Script file="TidyPlatesPanel.lua"/>
	<Script file="TidyPlatesMinimapButton.lua"/>	
</Ui>